package com.szp.lagou.mongodb.mongolearn;

import java.util.List;

import com.szp.lagou.mongodb.mongolearn.dao.ResumeDao;
import com.szp.lagou.mongodb.mongolearn.entity.Resume;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		ApplicationContext  applicationContext  = SpringApplication.run(DemoApplication.class, args);
		ResumeDao  resumeDao = applicationContext.getBean(ResumeDao.class);
        // Resume  resume  = new Resume();
        // resume.setName("lisi23");
        // resume.setSalary(28000);
        // resumeDao.insertResume(resume);
        // System.out.println("resume="+resume);

        Resume  resume2  =resumeDao.findByName("lisi22");
        System.out.println(resume2);
        List<Resume> datas = resumeDao.findList("zhangsan");
        System.out.println(datas);

	}

}
